{% extends 'layout.html' %}

{% block css %}
    <style>

        .icon-area ul {
            list-style-type: none;
            padding: 0;
        }

        .icon-area ul li {
            float: left;
            padding: 10px;
            padding-left: 0;
            width: 80px;
        }

        .icon-area ul li i {
            font-size: 18px;
            margin-left: 5px;
            color: #6d6565;
        }

    </style>

{% endblock %}

{% block content %}

    <div class="col-lg-offset-1 col-lg-8" style="margin-top: 50px">

        <form class="form-horizontal" action="" method="post" novalidate>
            {% csrf_token %}
            {% for field in form_obj %}
                <div class="form-group {% if field.errors %} has-error{% endif %}">

                    <label for="{{ field.id_for_label }}" class="col-sm-2 control-label">{{ field.label }}</label>
                    <div class="col-sm-10 icon-area">
                        {{ field }}
                        <span id="helpBlock2" class="help-block">{{ field.errors.0 }}</span>
                    </div>
                </div>
            {% endfor %}
            <p class="text-danger text-center"> {{ form_obj.non_field_errors.0 }} </p>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <button type="submit" class="btn btn-default">保存</button>
                </div>
            </div>
        </form>
    </div>

{% endblock %}